package com.example.spring.bean;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

// set注入之List和Set集合注入
// set注入之Map和Properties
// Properties的Key和Value只能说String类型
public class PerSon {
    // 注入List集合
    private List<String> name;

    // 注入Set集合
    private Set<String> addr;

    // 注入Map集合
    private Map<Integer,String> phones;

    // 注入属性类对象
    // Properties本质上也是Map集合
    private Properties properties;

    public void setProperties(Properties properties) {
        this.properties = properties;
    }

    public void setPhones(Map<Integer, String> phones) {
        this.phones = phones;
    }

    public void setName(List<String> name) {
        this.name = name;
    }

    public void setAddr(Set<String> addr) {
        this.addr = addr;
    }

    @Override
    public String toString() {
        return "PerSon{" +
                "name=" + name +
                ", addr=" + addr +
                ", phones=" + phones +
                ", properties=" + properties +
                '}';
    }
}
